<template>
  <div>

  </div>
</template>
<script>
  import bus from '@/utils/bus'

  export default {
    name: 'downloadSql',
    mounted() {
      this.$confirm('是否确认下载所有sql文件', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(async () => {
        // 加载页面
        const loading = this.$loading({
          lock: true,
          text: 'Loading',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.7)'
        });
        const baseURL = process.env.VUE_APP_BASE_API
        window.location.href = baseURL + '/view/sql'
        loading.close()
        bus.$emit('deleteCurrentTag', { name: 'Backup/downloadSql', path: '/backup/downloadSql' })
      }).catch(() => {
        bus.$emit('deleteCurrentTag', { name: 'Backup/downloadSql', path: '/backup/downloadSql' })
      })
    },
  }
</script>
<style lang="">

</style>
